package com.woniuxy02;



import java.util.Comparator;

/**
 * @author 作者
 * @create 2025-09-08 16:37
 */
public class StudentNameAsc implements Comparator {
    @Override
    public int compare(Object o1, Object o2) {
        if(o1 instanceof Student s1 && o2 instanceof Student s2){
            //姓名升序
            return s1.getName().compareTo(s2.getName());
        }

        return 0;
    }
}
